/*
 * @lc app=leetcode id=201 lang=cpp
 *
 * [201] Bitwise AND of Numbers Range
 */
class Solution {
public:
    int rangeBitwiseAnd(int m, int n) {
        int r = INT_MAX;
        while(m <= n) {
            r = r & m++;
        }
        return r;
    }
};

